<?php

namespace backend\models;

use Yii;

/**
 * This is the model class for table "project_pre_evaluation_mortgage".
 *
 * @property int $id
 * @property string $project_id
 * @property string $mortgagor 抵押人
 * @property string $mortgage_principal 抵押本金（万元）
 * @property string $mortgage_interest 抵押利息（万元）
 * @property string $guarantor 保证人
 * @property string $created_at
 */
class ProjectPreEvaluationMortgage extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'project_pre_evaluation_mortgage';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['project_id',], 'required'],
            [['project_id'], 'integer'],
            [['mortgage_principal', 'mortgage_interest'], 'number'],
            [['created_at'], 'safe'],
            [['mortgagor', 'guarantor'], 'string', 'max' => 255],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'project_id' => 'Project ID',
            'mortgagor' => '抵押人',
            'mortgage_principal' => '抵押本金（万元）',
            'mortgage_interest' => '抵押利息（万元）',
            'guarantor' => '保证人',
            'created_at' => 'Created At',
        ];
    }

    /**
     * @inheritdoc
     * @return ProjectPreEvaluationMortgageQuery the active query used by this AR class.
     */
    public static function find()
    {
        return new ProjectPreEvaluationMortgageQuery(get_called_class());
    }
}
